package com.cincc.cincc_pbx.model;

public class InternalContactModel {
    //是否是部门
    private boolean isOrg;
    //部门Id
    private String orgId;
    //parentId
    private String parentId;
    //部门或者人员名称
    private String name;
    //人员电话
    private String mobile;
    //人员分机号
    private String telephoneNumber;

    /**
     * 部门结构体
     *
     * @param isOrg
     * @param orgId
     * @param name
     */
    public InternalContactModel(boolean isOrg, String orgId, String name) {
        this.isOrg = isOrg;
        this.orgId = orgId;
        this.parentId = parentId;
        this.name = name;
    }

    /**
     * 人员结构体
     *
     * @param isOrg
     * @param name
     * @param mobile
     * @param telephoneNumber
     */
    public InternalContactModel(boolean isOrg, String name, String mobile, String telephoneNumber) {
        this.isOrg = isOrg;
        this.name = name;
        this.mobile = mobile;
        this.telephoneNumber = telephoneNumber.length() > 12 ? telephoneNumber.substring(12) : telephoneNumber;
    }

    public boolean isOrg() {
        return isOrg;
    }

    public void setOrg(boolean org) {
        isOrg = org;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getTelephoneNumber() {
        return telephoneNumber;
    }

    public void setTelephoneNumber(String telephoneNumber) {
        this.telephoneNumber = telephoneNumber;
    }
}
